﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Collections;
using System.Web.UI;

namespace Antu.Business.DmpExcel
{
    public class ExcelStruct
    {
        private DataTable _datatableTemp;
        /// <summary>
        /// 需要转变的DataTable
        /// </summary>
        public DataTable DataTableTemp
        {
            get
            {
                return _datatableTemp;
            }
            set
            {
                _datatableTemp = value;
            }
        }
        private string _tableName;
        /// <summary>
        /// 表名(显示在页面的表名,非数据库表名)
        /// </summary>
        public String TableName
        {
            get
            {
                return _tableName;
            }
            set
            {
                _tableName = value;
            }
        }

        private string _tableCss = " width='100%' cellpadding='0' cellspacing='0' bordercolor='#111111' border='1px'";
        /// <summary>
        /// 样式
        /// </summary>
        public String TableCss
        {
            get
            {
                return _tableCss;
            }
            set
            {
                _tableCss = value;
            }
        }
        private string _statField;
        /// <summary>
        /// 统计字段
        /// </summary>
        public String StatField
        {
            get
            {
                return _statField;
            }
            set
            {
                _statField = value;
            }
        }
        private Hashtable _formatField;
        /// <summary>
        /// 格式化字段(格式:Key存放FieldName Value存放formatType)
        /// </summary>
        public Hashtable FormatField
        {
            get
            {
                return _formatField;
            }
            set
            {
                _formatField = value;
            }
        }
        private Hashtable _fieldWidth;
        /// <summary>
        /// 字段宽度
        /// </summary>
        public Hashtable FieldWidth
        {
            get
            {
                return _fieldWidth;
            }
            set
            {
                _fieldWidth = value;
            }
        }
        private string _hiddenField = "";
        /// <summary>
        /// 隐藏字段，逗号分割
        /// </summary>
        public string HiddenField
        {
            get
            {
                return _hiddenField.ToUpper();
            }
            set
            {
                _hiddenField = value;
            }
        }
        private int _pageSize;
        /// <summary>
        /// 每页显示数据条数
        /// </summary>
        public Int32 PageSize
        {
            get
            {
                return _pageSize;
            }
            set
            {
                _pageSize = value;
            }
        }
        private bool _radioShow;
        /// <summary>
        /// 是否显示单选框
        /// </summary>
        public Boolean RadioShow
        {
            get
            {
                return _radioShow;
            }
            set
            {
                _radioShow = value;
            }
        }
        private bool _checkBoxShow;
        /// <summary>
        /// 是否显示复选框
        /// </summary>
        public Boolean CheckBoxShow
        {
            get
            {
                return _checkBoxShow;
            }
            set
            {
                _checkBoxShow = value;
            }
        }
        private string _valueShow;
        /// <summary>
        /// 绑定到单选或者复选框上的字段
        /// </summary>
        public String ValueShow
        {
            get
            {
                return _valueShow;
            }
            set
            {
                _valueShow = value;
            }
        }
        private Hashtable _changeField;
        /// <summary>
        /// 重命名字段（key存放Old Field,value存放New Field）
        /// </summary>
        public Hashtable ChangeField
        {
            get
            {
                return _changeField;
            }
            set
            {
                _changeField = value;
            }
        }
        private string _tableHeader = "";
        /// <summary>
        /// 具有特设样式的标题头
        /// </summary>
        public string TableHeader
        {
            get
            {
                return _tableHeader;
            }
            set
            {
                _tableHeader = value;
            }
        }

        private string _flag = "0";
        /// <summary>
        /// 序号标志位 ；
        /// 0:无序号,1:有序号,2:序号按照合并列列排序；
        /// 默认无序号
        /// </summary>
        public string Flag
        {
            get
            {
                return _flag;
            }
            set
            {
                _flag = value;
            }
        }

        private Page _pageSource;
        /// <summary>
        /// 窗体页
        /// </summary>
        public Page PageSource
        {
            get
            {
                return _pageSource;
            }
            set
            {
                _pageSource = value;
            }
        }
        private string _statColumnName = "合计";
        /// <summary>
        /// 重命名统计列名名称
        /// 默认"合计"
        /// </summary>
        public string StatColumnName
        {
            get
            {
                return _statColumnName;
            }
            set
            {
                _statColumnName = value;
            }
        }
        private DictionaryEntry _deRowspan;
        /// <summary>
        /// 合并行(key:列名,value:合并数量)
        /// </summary>
        public DictionaryEntry DeRowspan
        {

            get
            {
                return _deRowspan;
            }
            set
            {
                _deRowspan = value;
            }
        }
        private Hashtable _hashColspan;
        /// <summary>
        /// 合并列(key:行号,value:合并数量)
        /// 功能未实现，以后谁要用了自己抽象去...
        /// </summary>
        public Hashtable HashColspan
        {
            get
            {
                return _hashColspan;
            }
            set
            {
                _hashColspan = value;
            }
        }
        private bool _rowNamebold = true;
        /// <summary>
        /// 列名是否加粗
        /// </summary>
        public Boolean RowNameBold
        {
            get
            {
                return _rowNamebold;
            }
            set
            {
                _rowNamebold = value;
            }
        }
        private int _average = 1;
        /// <summary>
        /// 该字段为统计列求商
        /// (例如"被征地农民征地补偿安置情况调查表" 数据统计了2次,则设置为2,结果就不重复了)
        /// </summary>
        public Int32 Average
        {
            get
            {
                return _average;
            }
            set
            {
                _average = value;
            }
        }
        private int _pointcount = 2;
        /// <summary>
        /// 统计行保留小数位数
        /// </summary>
        public Int32 PointCount
        {
            get
            {
                return _pointcount;
            }
            set
            {
                _pointcount = value;
            }
        }
    }
}
